<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of verificar
 *
 * @author federico
 */
class Verific extends CI_Controller
{

  
    
    function index(){
        
        $data['bol']="true";
        $this->load->view('iniciar_sesion',$data);
    }
    
    function buscarBD(){
       // $users = array("leo:asd", "profesor:asd", "cliente:asd", "admin:admin");

        $bol = false;

        //for ($i = 0; $i < 4; $i++) {
            $tok = array("leo","asd");//split(":", $users[0]);
            //echo $tok[0].'|'.$user;
            //echo $tok[1].'|'.$pass;


            if (strcmp($tok[0], $username) == 0 and strcmp($tok[1], $pwd) == 0) {
                $bol = true;
            }
      //  }
        $bol=false;

        if ($bol) {
         //   session_start();
         //   $_SESSION['user'] = $username;
            echo 'login satisfactorio';

            
        } else {

            $data['bol']="false";
            $this->load->view('iniciar_sesion',$data);
        }
    }
}

?>
